/*
 *Copyright © 2018 anji-plus
 *安吉加加信息技术有限公司
 *http://www.anji-plus.com
 *All rights reserved.
 */
package com.company.cloud.captcha.modules.model.common;

import com.company.cloud.common.constant.ReturnCodeEnum;

/**
 * 返回应答码
 * @author
 *
 */
public enum RepCodeEnum implements ReturnCodeEnum {

    /** 0001 - 0099 网关应答码 */
    SUCCESS("0000", "成功"),
    ERROR("0001", "操作失败"),
    EXCEPTION("9999", "服务器内部异常"),

    BLANK_ERROR("0011", "{}不能为空"),
    NULL_ERROR("0011", "{}不能为空"),
    NOT_NULL_ERROR("0012", "{}必须为空"),
    NOT_EXIST_ERROR("0013", "{}数据库中不存在"),
    EXIST_ERROR("0014", "{}数据库中已存在"),
    PARAM_TYPE_ERROR("0015", "{}类型错误"),
    PARAM_FORMAT_ERROR("0016", "{}格式错误"),

    API_CAPTCHA_INVALID("6110", "验证码已失效，请重新获取"),
    API_CAPTCHA_COORDINATE_ERROR("6111", "验证失败"),
    API_CAPTCHA_ERROR("6112", "获取验证码失败,请联系管理员"),
    API_CAPTCHA_BASEMAP_NULL("6113", "底图未初始化成功，请检查路径"),

    ;
    private String code;
    private String msg;

    RepCodeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String getCode() {
        return code;
    }
    @Override
    public String getMsg() {
        return msg;
    }

    public String getName(){
        return this.name();
    }

}
